package oralExamSchedulingSystem;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Scanner;

public class IO {
        


        
        private Scanner getInput(String inputInfo)
        {
                
                System.out.println(inputInfo+": ");
                Scanner scanner = new Scanner (System.in);
                return scanner;
        }
        private String getLineInput(String inputInfo) throws IOException
        {
                
                System.out.println(inputInfo+": ");
        
                InputStreamReader converter = new InputStreamReader(System.in);
                BufferedReader in = new BufferedReader(converter);
                return in.readLine();
        }
        
        
        public String getReportingRoomNumber()
        {
                return getInput("Input the Reporting Room Number").next();
        }
        
        public String getAcademicYear()
        {
                return getInput("Input the Academic Year").next();
        }
        
        public String getSemester() throws IOException
        {
                return getLineInput("Input the Semester");
        }
        
        public int getNumberOfRoom() throws IOException
        {
                return Integer.parseInt(getInput("Input the Number of Rooms").next());
        }
        
        
        public LinkedList<String> getRoomNumbers(int numRoom) throws IOException
        {
                
        	Scanner receivedStrings=getInput("Input the Room Numbers");
        	
            LinkedList<String> roomNumbers= new LinkedList<String>();
            
            for (int i=0; i<numRoom; i++){
            	roomNumbers.add(receivedStrings.next());
            }
        	
            return roomNumbers;
        }
        

        
        public String getStartingTime()
        {
                return getInput("Input the Starting Time").next();
        }
        
        
        
        
        
        
        
        public ArrayList< Student > getCsvStudentList() throws IOException
        {
        	CSVParser csvParser = new CSVParser();
            return csvParser.inputParseCsv(getLineInput("Input the CSV File Path"));
        }
        
        public void showInfo(String output)
        {
                
                
                
        }

        
}